//
//  UILabel++.swift
//  WJHModernLib
//
//  Created by LC_WJH on 2017/12/5.
//

import Foundation


extension UILabel {
    
    
    ///使用HTML描述字符属性
    public func setWithHtmlString(_ html:String){
        
        //var ts =  String.init(format: "<font color='white'>积分:<font color='red'>%d</font></font>",980);
        //score.setWithHtmlString(ts);
        
//        if let aa = try? NSAttributedString.init(data: html.data(using: String.Encoding.unicode)!, options: [NSRTFTextDocumentType.DocumentAttribute.key : NSHTMLTextDocumentType], documentAttributes: nil) {
//            attributedText = aa;
//        }
    }
    
}

/*
 NSString * htmlString = @"<html><body> Some html string \n <font size=\"13\" color=\"red\">This is some text!</font> </body></html>";
 NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];  
 
 */
